import {message} from 'antd';
import {formatMessage} from './intl';
export const approveValidate = data => {
    if(data.approvedResult === null || data.approvedResult === undefined) {
        message.warning(
            formatMessage({
                id: 'validator.approvedResult',
                defaultMessage: '请选择审核状态'
            })
        );
        return false;
    }
    if(data.approveComment === null || data.approveComment === undefined || data.approveComment === '') {
        message.warning(
            formatMessage({
                id: 'validator.approveComment',
                defaultMessage: '请选择审核意见'
            })
        );
        return false;
    }
    return true;
};
